const card = document.querySelectorAll(".card");
card.forEach((item,index) =>{
  if (index !==1) {
  item.addEventListener("click", () => alert(item.innerText))
  
  }
}
);

const arr = [
  "https://ts1.cn.mm.bing.net/th/id/R-C.9016d188bb6eec34ab0796cc0ee2f66c?rik=ce3O%2bF%2bHqPSBCA&riu=http%3a%2f%2fp0.ifengimg.com%2fpmop%2f2018%2f0816%2f83B8A87C4AF6111174A3545AC470428E16E21F01_size101_w1080_h1350.jpeg&ehk=ES%2fNOM6L7HjAe25TjcDkI1vXWIq9WYxR2nEgdVYSJyY%3d&risl=&pid=ImgRaw&r=0",
  "https://tse2-mm.cn.bing.net/th/id/OIP-C.oMzqAAum12qa5FETd5XmFQHaJQ?pid=ImgDet&rs=1",
  "https://ts1.cn.mm.bing.net/th/id/R-C.35adc3ebcb68c140abea3b9a0aba10dc?rik=iUzXTErHBp%2b0VA&riu=http%3a%2f%2fwww.uweekly.sg%2fwp-content%2fuploads%2f2015%2f04%2fPakho-%e5%91%a8%e6%9f%8f%e8%b1%aa.jpg&ehk=w8mleYIblCqIySniriWIi%2fOh8jRuobNhz9k0vOV6IPs%3d&risl=&pid=ImgRaw&r=0",
];
const wga = document.querySelector("#wga");
let index = 0;
wga.style.backgroundImage = `url(${arr[index]})`;
setInterval(() => {
  index++;
  index = index >= arr.length ? 0 : index;
  wga.style.backgroundImage = `url(${arr[index]})`;
}, 800);







const kaixiang=document.querySelector('#kx')

kaixiang.addEventListener('click',function(e){
  this.querySelector("span").innerText="kaixiang"

  document.querySelector('.kaixiang').style.display="none"
  
 document.querySelector('.kaixiang div').classList.toggle("bgcimg")
 if (document.querySelector('.kaixiang div').classList.contains("bgcimg")) {
  document.querySelector('.kaixiang').style.display="flex"
  alert("你好我叫kaixiang，这是我喜欢的运动")
  this.querySelector("span").innerText=""

 }

})